#include "dialog.h"
#include "ui_dialog.h"
#include <QHBoxLayout>

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog),
    m_view(NULL),
    m_model(NULL)
{
    ui->setupUi(this);
    QHBoxLayout *layout = new QHBoxLayout;
    m_view = new QListView(this);
    m_model = new MyModel(this);
    m_view->setModel(m_model);

    layout->addWidget(m_view);
    setLayout(layout);

}

Dialog::~Dialog()
{
    delete ui;
}
